package com.woniuxy.sender;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @Author: 曾令忠
 * @Description: 正常发送业务
 * @Date: 2020/7/7 0007-上午 10:00
 */
@Component
public class BusinessSender {
    @Autowired
    RabbitTemplate rabbitTemplate;
    public void send(int num){
        String msg = "真正的大师永远都怀着一颗学徒的心";
        rabbitTemplate.convertAndSend("businessExchange","business",msg+num);
    }
}
